Mapping page states to urls

ABSTRACT

A client application displaying a dynamically generated single page from a web application may display consistent and intuitive uniform resource locators (URLs) that are mapped to various states of the single page (e.g., various states entered based on user interactions with dynamically generated content from the web application). The various states of the single page may be mapped to corresponding URLs based on the user interactions with respect to the single page. These URLs may be used to revisit the single page in its respectively corresponding states.

RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 13/782,840, filed Mar. 1, 2013, and entitled“MAPPING PAGE STATES TO URLs,” which claims the priority benefit ofProvisional Patent Application No. 61/756,864, filed Jan. 25, 2013. Thecontents of these prior applications are considered part of thisapplication, and are hereby incorporated by reference in their entirety.

TECHNICAL FIELD

The subject matter disclosed herein generally relates to the processingof data. In particular, the present disclosure addresses systems andmethods to facilitate mapping of page states to uniform resourcelocators (URLs).

BACKGROUND

A network-accessible resource a device, or data stored thereon may beidentified by a uniform resource identifier (URI). Examples of a URIinclude a URL, a uniform resource name (URN), or any suitablecombination thereof. A URI may be, or include, a string of alphanumericcharacters that corresponds to the network-accessible resourceidentified by the URI.

A web page may form all or part of a document or presentation that isidentified by a URI. For example, a URL may identify a network-basedlocation of the web page. A software application (e.g., an Internetbrowser application) may use the webpage's URL to access (e.g., request,read, retrieve, or download) the web page (e.g., from a web servermachine to a web client device). In some situations, a web applicationexecutes on a web server machine and dynamically generates the web pagebased on (e.g., in response to) one or more user inputs received.

BRIEF DESCRIPTION OF THE DRAWINGS

Some embodiments are illustrated by way of example and not limitation inthe figures of the accompanying drawings.

FIG. 1 is a network diagram illustrating a network environment suitablefor mapping page states to URLs, according to some example embodiments.

FIG. 2 is a block diagram illustrating components of a web servermachine and a device, according to some example embodiments.

FIG. 3-6 are annotated flowcharts illustrating and describing operationsof the web server machine and the device in performing a method ofmapping page states to URLs, according to some example embodiments.

FIG. 7-8 are flowcharts illustrating operations of the web servermachine in performing a method of mapping page states to URLs, accordingto some example embodiments.

FIG. 9 is a flowchart illustrating operations of the web server machinealongside operations of the device in performing a method of using pagestates that are mapped to URLs, according to some example embodiments.

FIG. 10 is a block diagram illustrating components of a machine,according to some example embodiments, able to read instructions from amachine-readable medium and perform any one or more of the methodologiesdiscussed herein.

DETAILED DESCRIPTION

Example methods and systems are directed to mapping page states to URIs(e.g., URLs). Examples merely typify possible variations. Unlessexplicitly stated otherwise, components and functions are optional andmay be combined or subdivided, and operations may vary in sequence or becombined or subdivided. In the following description, for purposes ofexplanation, numerous specific details are set forth to provide athorough understanding of example embodiments. It will be evident to oneskilled in the art, however, that the present subject matter may bepracticed without these specific details.

According to various example embodiments, one or more of the methods andsystems discussed herein provide a way for managing consistent URLs on asingle-page web application by mapping various states of a single page(e.g., a single web page that is generated and provided by thesingle-page web application) to various URLs. In the example context ofa network-based commerce system (e.g., an online shopping website), suchURLs may include category URLs (e.g., a URL that specifies a web pagedescribing a category of items available for sale), product URLs (e.g.,a URL that specifies a web page describing a product of which multipleitems are specimens), item URLs (e.g., a URL that specifies a web pagedescribing a specific item available for sale), or any suitablecombination thereof.

Using an example embodiment of a method or system discussed herein, aclient application displaying a single page from such a web applicationmay display consistent and intuitive URLs that are mapped to variousstates of the single page (e.g., states entered based on one or moreuser interactions with dynamically generated content provided within thesingle page by the web application). The various states of the singlepage may be mapped to corresponding URLs based on the one or more userinteractions with respect to the single page. These URLs may be used torevisit the single page in its various states that respectivelycorrespond to these URLs. This approach may be contrasted with usinghash fragments (e.g., hash tags) to denote various states of the singlepage (e.g., showing the same page URL in a browser, but with a differenthash fragment for each state of the single page).

With some web applications, when a user types a URL into a browser(e.g., into a user interface of a browser application), the browsermakes a URL request (e.g., call) to a web server (e.g., web servermachine), and the web server provides (e.g., returns) dynamic contentwhich the browser then presents as a single page (e.g., a single webpage) to the user (e.g., displayed on a screen of a client device of theuser). Subsequently, when the user interacts with any of this dynamiccontent (e.g., links, buttons, or hotspots) on the presented singlepage, the interaction may be handled by, for example:

1. Making another URL request to the web server, which tells the webserver to resend the entire content (e.g., dynamic content) of the page,thus refreshing (e.g., repainting) the entire page; or

2. Making an Asynchronous JavaScript and XML (AJAX, where XML refers toeXtensible Markup Language) request (e.g., an AJAX call) to the webserver and loading all the content of the page on the front end (e.g.,into the browser on the client side), thus enabling the user to interactwith any of the dynamic content (e.g., links, buttons, or hotspots)without refreshing or leaving the page, with additional requests (e.g.,calls) being made to web server for additional data (e.g., additionaldynamic content) only when needed.

Option 2 is sometimes used for building single-page web applicationsbecause of its ability to deliver a pleasant user experience. However,when the user interacts with the single page (e.g., a single web page)and navigates to different features of the web application, the state ofthe single page changes. For example, the page may take on a differentappearance (e.g., present some of the dynamic content differently orpresent different content altogether). However, the URL of the page mayremain the same, although a hash fragment (e.g., a hash tag) may beappended to the page's URL, which may cause the page's URL to appearnon-intuitive, difficult to for users to read, and difficult for usersto use (e.g., access dynamically generated content using a browser's“back” button or “forward” button, or copy and paste so other users maysee the page in its current state).

In this context, one or more the methods and systems discussed hereinmay provide one or more of the following benefits:

1. Even though a web application (e.g., a mobile web site for mobiledevices) may be designed as a single page, users see a different URL(e.g., in their browsers) for different states (e.g., areas,configurations, or histories) of the single page. These different URLsmay be managed (e.g., generated, mapped, or both) to have a consistentappearance (e.g., an intuitive look or easily understandable syntax).

2. A user may go back and forth within his action history (e.g., backand forth within a history of URLs previously visited) and navigatethrough previously presented states of the single page.

3. In some example embodiments, an interaction by the user with thesingle page generates a state (e.g., a new state), and that state may bemapped to a valid URL (e.g., URL that includes a string of alphanumericcharacters).

4. In some example embodiments, an interaction by the user with thesingle page causes the browser to display an updated URL (e.g., mappedto the corresponding state of the single page) without reloading thesingle page.

5. In some example embodiments, a user may use the browser to manuallyrequest a refresh of the single page, and the single page will bereloaded (e.g., repainted or refreshed) with the same state that wasdisplayed prior to the refresh.

6. In some example embodiments, a state of the page corresponds to aspecific view of the page, and the corresponding URL for that state maybe mapped to that specific view the page.

Additional benefits that may be obtained include, for example:

1. URLs for various page states are readily indexable by search enginesfor search engine optimization (SEO) purposes (e.g., SEO)-friendlyURLs).

2. A user can easily copy an intuitive URL for a particular state of apage from his browser and share the URL on one or more social mediasites or anywhere else. When someone else clicks on that URL, they willsee the same page that was shared by the user, in the same particularstate.

3. User experiences may be enhanced or improved as a result of dynamiccontent being loaded just one time (e.g., the first time a piece ofdynamic content is needed), regardless how many times a user leaves andrevisits a particular state of the page.

4. In some example embodiments, a web application may provide acustomized page that is tailored (e.g., personalized) to a group ofusers interested in similar content, for example, by providing a mappedURL that specifies a particular state (e.g., a customized state that ispreconfigured for the group of users) of the page.

According to various example embodiments, a web server machine may beconfigured to execute a web application with a back-end module (e.g., aURL validation module) and provide a web client device with abrowser-executable front-end module (e.g., a URL management module). Forexample, a set of one or more representational state transfer (REST)services may be executed on the server side (e.g., by the web servermachine, as configured by a URL validation module of the webapplication) to validate any URL path (e.g., via execution of the URLvalidation module), while a set of one or more JavaScript programs areexecuted on the client side (e.g., on the browser side, by the clientdevice, as configured by a URL management module) to manage URLs andstates for the single-page web application (e.g., by execution of a URLmanagement module).

FIG. 1 is a network diagram illustrating a network environment 100suitable for mapping page states to URLs, according to some exampleembodiments. The network environment 100 includes a web server machine110, a database 115, and devices 130 and 150, all communicativelycoupled to each other via a network 190. The web server machine 110 andthe devices 130 and 150 may each be implemented in a computer system, inwhole or in part, as described below with respect to FIG. 10.

The web server machine 110 may be configured (e.g., by special-purposesoftware) to perform any one or more the methodologies discussed herein.The web server machine 110, with or without the database 115, may formall or part of a network-based system 105 that provides one or more webservices.

Also shown in FIG. 1 are users 132 and 152. One or both of the users 132and 152 may be a human user (e.g., a human being), a machine user (e.g.,a computer configured by a software program to interact with the device130), or any suitable combination thereof (e.g., a human assisted by amachine or a machine supervised by a human). The user 132 is not part ofthe network environment 100, but is associated with the device 130 andmay be a user of the device 130. For example, the device 130 may be adesktop computer, a vehicle computer, a tablet computer, a navigationaldevice, a portable media device, or a smart phone belonging to the user132. Likewise, the user 152 is not part of the network environment 100,but is associated with the device 150. As an example, the device 150 maybe a desktop computer, a vehicle computer, a tablet computer, anavigational device, a portable media device, or a smart phone belongingto the user 152.

Accordingly, the web server machine 110 (e.g., as part of thenetwork-based system 105) may provide one or more web services to one ormore web clients (e.g., devices 130 and 150). One or both of the devices130 and 150 may be a mobile device (e.g., a smart phone, vehiclecomputer, or a tablet computer) through which a user (e.g., user 132 oruser 152) may access and use the one or more web services provided bythe web server machine 110.

For example, the web server machine 110 may provide (e.g., serve) a pageof content (e.g., a single web page that includes and presentsdynamically generated web content) to the device 130. The device 130 mayexecute an application (e.g., a browser application) that allows theuser 132 to interact with the provided page of content (e.g., touch on alink to request additional content, touch and hold over a hotspot in thepresented content to open a pop-up window with additional content, mouseover presented content to trigger notification, manipulate thepresentation of content by clicking and dragging on it, or any suitablecombination thereof).

Any of the machines, databases, or devices shown in FIG. 1 may beimplemented in a general-purpose computer modified (e.g., configured orprogrammed) by software to be a special-purpose computer to perform thefunctions described herein for that machine, database, or device. Forexample, a computer system able to implement any one or more of themethodologies described herein is discussed below with respect to FIG.10. As used herein, a “database” is a data storage resource and maystore data structured as a text file, a table, a spreadsheet, arelational database (e.g., an object-relational database), a triplestore, a hierarchical data store, or any suitable combination thereof.Moreover, any two or more of the machines, databases, or devicesillustrated in FIG. 1 may be combined into a single machine, and thefunctions described herein for any single machine, database, or devicemay be subdivided among multiple machines, databases, or devices.

The network 190 may be any network that enables communication between oramong machines, databases, and devices (e.g., the web server machine 110and the device 130). Accordingly, the network 190 may be a wirednetwork, a wireless network (e.g., a mobile or cellular network), or anysuitable combination thereof. The network 190 may include one or moreportions that constitute a private network, a public network (e.g., theInternet), or any suitable combination thereof.

FIG. 2 is a block diagram illustrating components of the web servermachine 110 and the device 130, according to some example embodiments.The web server machine 110 is shown as including a web application 210(e.g., a web service application executing on the web server machine110), a validation module 220 (e.g., a further web service applicationexecuting on the web server machine 110), and a provision module 230(e.g., yet another web service application executing on the web servermachine 110), all configured to communicate with each other (e.g., via abus, shared memory, or a switch).

The web application 210 is an application that provides a web service toone or more devices (e.g., device 130), and the web application 210 maybe a mobile application (e.g., an application that provides a webservice to one or more mobile devices). According to some exampleembodiments, the validation module 220 is a URL validation moduleconfigured to validate one or more URLs (e.g., as a web service providedto one or more devices). The provision module 230 is configured toprovide software (e.g., browser executable software, such as aJavaScript program or Java applet).

The device 130 is shown as including a browser 250 (e.g., a browserapplication executing on the device 130), which includes a managementmodule 260 (e.g., browser-executable software, such as a JavaScriptprogram or Java applet). Within the web server machine 110, theprovision module 230 may be configured as a download module (e.g., anapplication that provides software, for example, the management module260, to one or more devices).

Any one or more of the modules or applications described herein may beimplemented using hardware (e.g., a processor of a machine) or acombination of hardware and software. For example, any module orapplication described herein may configure a processor to perform theoperations described herein for that module. Moreover, any two or moreof these modules or applications may be combined into a single module,and the functions described herein for a single module may be subdividedamong multiple modules or applications. Furthermore, according tovarious example embodiments, modules and applications described hereinas being implemented within a single machine, database, or device may bedistributed across multiple machines, databases, or devices.

FIG. 3-6 are annotated flowcharts illustrating and describing operationsof the web server machine 110 and the device 130 in performing a method300 of mapping page states to URLs, according to some exampleembodiments. Operations in the method 300 may be performed,respectively, by the web server machine 110 or the device 130, using oneor more of the modules described above with respect to FIG. 2.

As shown in FIG. 3, in operation 301, the device 130 opens a URL, whichmay correspond to the web application 210. For example, the device 130may execute the browser 250, which may be configured to request a webpage (e.g., a single-page web page) from the web application 210executing on the web server machine 110. This request may be initiatedby the user 132 in interacting with a browser 250. The example URL shownin FIG. 3, “http://t.d.com/x/z,” includes a protocol name (“http”), adomain name (“d.com”), a subdomain name (“t”), and a folder path(“/x/z”). In the example URL shown, there are no URL parameters, whichare alphanumeric strings that begin with a question mark (“?”) and areseparated by ampersands (“&”). In the example URL shown, there are alsono fragments (e.g., hash fragments, hash tags, or named anchors), whichare alphanumeric strings a begin with a number sign (“#”, also called apound sign or a hash).

In operation 302, the web application 210 responds by providing content(e.g., dynamically generated web content) to the device 130. Forexample, the content provided may include hypertext markup language(HTML) data, cascading style sheet (CSS) data, browser-executablesoftware (e.g., JavaScript files), or any suitable combination thereof.In some example embodiments, the provided content may include themanagement module 260 (e.g., as browser-executable software forexecution in the browser 250 on the device 130). As noted in FIG. 3, theprovided content may be independent of any folder path (e.g., “/x/z”)specified in the URL. That is, the provided content may depend solely onthe protocol name and the domain name, or in alternative exampleembodiments, solely on the protocol name, the subdomain name, and thedomain name.

In operation 303, the validation module 220 verifies some or all of thefolder path specified in the URL (e.g., verifies “x” and “z”). As notedin FIG. 3, the validation module 220 may form all or part of a URLvalidation service, which may be implemented as a REST service (e.g., a“RESTful” service). The URL's folder path (“/x/z”, or “x” and “z”) ismapped to a state, and this state may be stored in the database 115. Thevalidation module 220 may therefore access the database 115 to verifysome or all of the folder path. This verification may be performed inresponse to the URL being opened in operation 301 (e.g., a page load).As noted in FIG. 3, the database 115 may store information related tothe folder path (“/x/z”), and this related information may be retrievedby the validation module 220 (e.g., as an initial state of the requestedweb page. According to various example embodiments, operation 303 may beperformed when the URL is first opened by the device 130 (e.g., initialpage load), when the URL is revisited by the device 130 (e.g.,subsequent page load), or both.

In operation 304, the management module 260 may receive (e.g., via thebrowser 250) the verification of some or all of the folder path (“/x/z”or “x”) from the validation module 220, and the management module 260may receive (e.g., via the browser 250) information related to thefolder path (“/x/z”) from the validation module 220. Based on this, themanagement module 260 may allow or cause the device 130 (e.g., via thebrowser 250) to load the requested web page and display of the web pageon a screen 131 of the device 130. The requested web page may be loadedin a first state (e.g., initial state or “state 1”), based on therelated information received by the management module 260 (e.g., storedin the database 115 as corresponding to the URL's folder path).

In operation 305, the user 132 interacts with the loaded web page andits contents (e.g., activates a link, button, or hotspot). For example,the user 132 may click on a link that references another URL, which maycorrespond to the web application 210 (e.g., “http://t.d.com/y/k” orjust “/y/k”). As noted in FIG. 3, this further URL may be mapped to asecond state (e.g., subsequent state or “state 2”) of the web page. Thissecond state may be stored in the database 115. When the user 132activates content that references this further URL, the managementmodule 260 detects this (e.g., from the browser 250 notifying themanagement module 260). In some example embodiments, the managementmodule 260 requests verification of some or all of this further URL(e.g., the folder path “/y/k”) from the validation module 220, and avalidation module 220 may respond with the requested verification, aswell as information related to the second state of the web page.

In operation 306, the management module 260 may receive verification ofsome or all of the further URL (e.g., folder path “/y/k”) thatcorresponds to the second state of the web page, and they receiveinformation related to the second state or its corresponding folder path(“/y/k”). Based on this, the management module 260 may allow or causethe device 130 (e.g., via the browser 250) to update the web page to itssecond state. This may be performed without reloading the web page. Asnoted in FIG. 3, the user 132 can switch between the first state and thesecond state by using one or more page navigation controls within thebrowser 250 (e.g., a “back” button, a “forward” buttons, or both).

As shown in FIG. 3, if the browser 250 is displaying the second state ofthe web page (“state 2” which is mapped to the folder path “/y/k”), andthe user 132 requests that the browser 250 refresh the web page, themethod 300 returns to operation 301, in which the URL for the web pageis opened. This time, however, the URL includes the folder path (“/y/k”,not shown) that corresponds to the second state of the web page.

As shown in FIG. 4, if the browser 250 is displaying the first state ofthe web page (“state 1” which is maps to the folder path “/x/z”), andthe user 132 request that the browser 250 refresh the web page, themethod 300 returns to operation 301, in which the URL for the web pageis opened. As shown in FIG. 4, the URL includes the folder path (“/x/z”)that corresponds to the first state of the web page. Otherwise, FIG. 4depicts an example embodiment similar to the example embodiment shown inFIG. 3.

As shown in FIG. 5, the browser 250 may utilize a browser cache 510 tostore (e.g., temporarily or permanently) information corresponding tovarious states of the web page (e.g., stored by the database 115 andprovided by the validation module 220). The browser cache 510 may formall or part of a local storage (e.g., memory) or other repository ofdata easily accessible by the device 130. In example embodiments thatutilize the browser cache 510, the method 300 includes one or more ofoperations 501, 502, and 503.

In operation 501, if the user 132 requests that the URL“http://t.d.com/x/z” be opened (e.g., a page load request), themanagement module 260 may check the browser cache 510 for any cacheddata related to the URL's folder path (“/x/z”). For example, the browsercache 510 may store information related to the first state of the webpage (e.g., information that defines the first state of the web page),and the management module 260 may check the browser cache 510 for suchrelated information. If the browser cache 510 contains such cached data,the cached data is used by the management module 260 to allow or causethe device 130 (e.g., by the browser 250 to load the web page in itsfirst state, which corresponds to the folder path “/x/z”. In thissituation, operations 502 and 503 may be omitted.

In operation 502, if the browser cache 510 contains no data related tothe folder path (“/x/z”), the management module 260 requests that thevalidation module 220 provide a verification of the folder path. Thisrequest and its corresponding response by the validation module 220 maybe performed in a manner similar to that described above with respect tooperation 303.

In operation 503, the management module 260 may receive (e.g., via thebrowser 250) information related to the folder path (“/x/z”) from thevalidation module 220, and the management module 260 may store (e.g.,cache) this received information in the browser cache 510. Thus, thisrelated data may be available and easily accessible by the browser 250for responding to future requests to open the URL “http://t.d.com/x/z”.As noted above, in operation 304, the management module 260 may receive(e.g., via the browser 250) verification of some or all of the folderpath (“/x/z”), and based on this verification, the management module 260may allow or cause the device 130 (e.g., via the browser 250) to loadthe web page in its first state, which corresponds to the folder path“/x/z”. According to various example embodiments, operation 503 may beperformed prior to operation 304, in conjunction with operation 304, aspart of operation 304, or after operation 304.

As shown in FIG. 6, in situations where the validation module 220provides no verification of the folder path “/x/z” or provides aresponse that indicates some or all of the folder path (e.g., “x” or“z”) is invalid, the method 300 may include one or more of operations604 and 605 to handle such error cases. In the example shown in FIG. 6,the folder path “/x/z” is partially invalid. Specifically, in thisexample, “x” is valid, while “z” is not. For example, “x” may beunexpired (e.g., as an alphanumeric string for designating part of afolder path), while “z” may be expired (e.g., as an alphanumeric stringfor designating part of the folder path).

In operation 604, the management module 260 may receive (e.g., via thebrowser 250) information related only to the valid portion of the folderpath (e.g., “x”) from the validation module 220. Based on this, inoperation 605, the management module 260 may allow or cause the device130 (e.g., via the browser 250) to load the requested web page in astate that corresponds to the valid portion of the folder path (e.g.,based on the information received in operation 604). In some exampleembodiments, this state is the same as the web page's first state (e.g.,initial state or “state 1”).

FIG. 7-8 are flowcharts illustrating operations of the web servermachine 110 in performing a method 700 of mapping page states to URLs,according to some example embodiments. Operations in the method 700 maybe performed using modules and applications described above with respectto FIG. 2. As shown in FIG. 7, the method 700 includes operations 710,720, 730, and 740.

In operation 710, the web application 210 of the web server machine 110receives a request (e.g., a page request) that references a first URL(e.g., http://t.d.com/x/z, with a first folder path “/x/z”) by which adocument (e.g., a web page with dynamically generated content) islocatable for display in the browser 250 (e.g., for display via thescreen 131 of the device 130). This first URL may correspond to a firststate in which the document has a first appearance (e.g., a firstarrangement of content, a first set of content elements, or both). Forexample, the web application 210 may receive a request that includes thefirst URL, which may be usable to locate a single-page web page ofdynamically generated content.

In operation 720, the web application 210 provides the requesteddocument in its first state (e.g., with its first appearance) to thebrowser 250. The requested document may be provided in response to therequest received in operation 710, and provision of the requesteddocument may also be based on the first URL, which may correspond to thefirst state of the document (e.g., corresponding to the document's firstappearance). In its first state, the document may include a control(e.g., a link, a button, a hotspot, or any suitable combination thereof)that is usable to invoke a second state in which the document has asecond appearance (e.g., a second arrangement of content, a second setof content elements, or both). The control may reference (e.g., containa reference to) a second URL (e.g., http://t.d.com/y/k, with a secondfolder path “/y/k”) by which the document is locatable for display inthe browser 250.

In operation 730, the validation module 220 of the web server machine110 detects use of the control (e.g., the link, the button, the hotspot,or any suitable combination thereof) to invoke the second state of thedocument (e.g., with the second appearance of the document). As notedabove, the control may reference (e.g., by inclusion) the second URL,and the validation module 220 may detect the use of the control bydetecting a request that the document be provided in its second state(e.g., with its second appearance) for display in the browser 250. Forexample, the validation module 220 may directly receive such a requestfrom the browser 250 (e.g., from browser-executable software, such asthe management module 260). As another example, the validation module220 may detect that the web application 210 receives such a request fromthe browser 250 (e.g., by monitoring the web application 210 orreceiving a notification from the web application 210).

In response to the use of the control, the browser 250 may display thedocument in its second state (e.g., with its second appearance). Forexample, information related to the second state (e.g., information thatdefines the second state) may be obtained by the browser 250 (e.g., bythe management module 260) from the validation module 220, from the webapplication 210, from the database 115, from the browser cache 510, orany suitable combination thereof.

In operation 740, the validation module 220 of the web server machine110 maps the second state of the document to the second URL (e.g.,http://t.d.com/y/k). For example, the validation module 220 may map thesecond state to the second URL by storing a correspondence relationshipbetween the second URL and data that defines the second appearance ofthe document (e.g., the related information discussed above with respectto operation 730). The correspondence relationship, the second URL, thedata that defines the second appearance, or any suitable combinationthereof, may be stored by the validation module 220 in the database 115(e.g., in row of a table or as a triplet).

As shown in FIG. 8, the method 700 may include one or more of operations802, 810, 812, 830, 832, 840, and 842. Operation 802 may be performedprior to operation 710 or in response to the request received inoperation 710. In operation 802, the provision module 230 of the webserver machine 110 provides the management module 260 to the browser 250(e.g., for execution within the browser 250, for example, asbrowser-executable software, such as a plug-in, an applet, a widget, ascript, or any suitable combination thereof).

After being provided to the browser 250, the management module 260 mayconfigure the browser 250 to store information related to the secondstate (e.g., data that defines the second appearance) of the documentlocatable by the first URL (e.g., http://t.d.com/x/z) referenced by therequest received in operation 710. For example, the management module260 may configure the browser 250 to store such related information inthe browser cache 510. The management module 260 may also configure thebrowser 250 to store the correspondence relationship between the secondURL (e.g., http://t.d.com/y/k) and the information related to the secondstate. This correspondence relationship may also be stored in thebrowser cache 510. The management module 260 may further configure tobrowser 250 to request verification that one or more URLs (e.g., thefirst URL, the second URL, or both) correspond to a valid state of thedocument (e.g., an unexpired state).

Operation 810 may be performed as part (e.g., a precursor task, asubroutine, or a portion) of, or in parallel with, operation 710, inwhich the request that references the first URL is received. Inoperation 810, the validation module 220 of the web server machine 110receives a request for verification that the first URL corresponds to avalid state (e.g., the first state, which may be a non-expired state)for the document. According to various example embodiments, thevalidation module 220 may perform some or all of the requestedverification (e.g., by accessing a lookup table within the database 115that indicates which URLs are valid).

In operation 812, the validation module 220 provides the requestedverification that the first URL (e.g., http://t.d.com/x/z, with itsfirst folder path “/x/z”) corresponds to a valid state of the document.For example, the validation module 220 may provide the browser 250(e.g., via the management module 260) an indication that the first URLcorresponds to the first state (e.g., with the first appearance) of thedocument, and that this first state is a valid (e.g., non-expired) statefor the document. Operations 810 and 812 within the method 700 maycorrespond to all or part of operation 303 within the method 300. Insome example embodiments, operation 720 may be performed based on theverification provided in operation 812.

Operation 830 may be performed as part of, or in parallel with,operation 730, in which the validation module 220 detects the use of thecontrol to invoke the second state of the document. In operation 830,the validation module 220 of the web server machine 110 receives arequest for verification that the second URL corresponds to a validstate the second state, which may be a non-expired state) for thedocument. According to various example embodiments, the validationmodule 220 may perform some or all of the requested verification (e.g.,by accessing a lookup table within the database 115 that indicates whichURLs are valid).

In operation 832, the validation module 220 provides the requestedverification that the second URL (e.g., http://t.d.com/y/k, with itssecond folder path “/y/k”) corresponds to a valid state of the document.For example, the validation module 220 may provide the browser 250(e.g., via the management module 260) an indication that the second URLcorresponds to the second state (e.g., with the second appearance) ofthe document, and that this second state is a valid (e.g., non-expired)state for the document. Operations 830 and 832 within the method 700 maycorrespond to all or part of operation 305 within the method 300. Insome example embodiments, data that defines the second state of thedocument may be provided (e.g., by the web application 210, thevalidation module 220, or both) to the browser 250 (e.g., via themanagement module 260) based on the verification provided in operation832.

Operation 840 may be performed while the browser 250 is displaying thesecond state of the document (e.g., on the screen 131 of the device130). In some example embodiments, the document in its second state maylack any control (e.g., any link, button, or hotspot) that is usable toinvoke the first state of the document (e.g., first state in which thedocument has its first appearance). In these situations, the user 132may wish to redisplay the document in its first state by giving thebrowser 250 a command to navigate backwards within a history of URLs(e.g., URLs that correspond to content previously displayed by thebrowser 250). For example, the user 132 may wish to have the browser 250execute a “back” command to redisplay the document in its first state.

In some example embodiments, operation 840 may be performed while thebrowser displaying some further content (e.g., third state of thedocument or another document entirely), and the user 132 may wish toredisplay the document in its first state. In these situations, the user132 may wish to redisplay the document in its first state by giving thebrowser 250 a command to navigate forwards within the history of URLsfor the browser 250. For example, the user 132 may wish to have thebrowser 250 execute a “forward” command to redisplay the document in itsfirst state.

In certain example embodiments, operation 840 may be performed while thebrowser displaying the first state of the document (e.g., as a result ofnavigating within the history of URLs). In these situations, the user132 may wish to reload (e.g., refresh) the document in its first stateby having the browser 250 execute a “reload” command, a “refresh”command, or a “redraw” command.

In operation 840, the validation module 220 of the web server machine110 receives a request for verification that the first URL correspondsto a valid state (e.g., the first state, which may be a non-expiredstate) for the document. As noted above, the validation module 220 mayperform some or all of the requested verification (e.g., by accessing alookup table within the database 115 that indicates which URLs arevalid). According to various example embodiments, the receiving of thisrequest may be a result of the browser 250 executing a user command(e.g., a “back” command, a “forward” command, a “refresh” command, orany suitable combination thereof).

In operation 842, the validation module 220 provides the requestedverification that the first URL (e.g., http://t.d.com/x/z, with itsfirst folder path “/x/z”) corresponds to a valid state of the document.As noted above, the validation module 220 may provide the browser 250(e.g., via the management module 260) an indication that the first URLcorresponds to the first state (e.g., with the first appearance) of thedocument, and that this first state is a valid (e.g., non-expired) statefor the document. According to some example embodiments, data thatdefines the first data the document may be provided (e.g., by the webapplication 210, the validation module 220, or both) to the browser 250(e.g., via the management module 260) based on the verification providedin operation 842.

FIG. 9 is a flowchart illustrating operations in the method 700alongside operations of the device 130 in performing a method 900 ofusing page states that are mapped to URLs, according to some exampleembodiments. Operations in the method 900 may be performed using modulesand applications described above with respect to FIG. 2. As shown inFIG. 9, the method 900 includes one or more of operations 902, 904, 905,912, 924, 926, 932, 934, 940, and 944.

In operation 902, the device 130, the browser 250, or both, receives themanagement module 260 provided by the web server machine 110 inoperation 802. The browser 250 may then incorporate or execute themanagement module 260 (e.g., as browser-executable software, such as aplug-in, an applet, a widget, a script, or any suitable combinationthereof).

In operation 904, the browser 250 sends the request received by the webserver machine 110 in operation 710. As noted above, this requestreferences the first URL (e.g., http://t.d.com/x/z, with its firstfolder path “/x/z”) by which the document is locatable.

Operation 905 may be performed as part of, or in parallel with,operation 904. In operation 905, the management module 260 of the device130 sends the request received by the web server machine 110 inoperation 810, which may be a part of operation 710. As noted above,this request may be a request for verification that the first URL (e.g.,http://t.d.com/x/z) corresponds to a valid state of the document.

In operation 912, the management module 260 of the device 130 accessesthe browser cache 510 and checks the browser cache 510 for any data thatdefines the first state of the document (e.g., data that defines thefirst appearance of the document). Operation 912 may be performed inresponse to the verification provided by the web server machine 110 inoperation 812 (e.g., the verification that the first URL corresponds toa valid state for the document). As noted above, if such data is presentin the browser cache 510, it may be used (e.g., retrieved) by themanagement module 260, by the browser 250, or both, to display thedocument in its first state (e.g., with its first appearance) on thescreen 131 of the device 130.

In operation 924, the browser 250 on the device 130 displays thedocument in its first state, with its first appearance, and may displaythe first URL (e.g., http://t.d.com/x/z) which corresponds the firststate, while displaying the document in its first state. According tovarious example embodiments, the first URL is devoid of any hashfragments (e.g., hash tags), and the first URL is displayed by thebrowser 250 without any hash fragment included in the first URL. Themanagement module 260 of the device 130 may fully or partially controlthe browser 250 during performance of operation 924.

In operation 926, the management module 260 (e.g., executing as part ofthe browser 250) sends the request received by the web server machine110 in operation 830, which may be part of operation 730. As notedabove, this request references the second URL (e.g., http://t.d.com/y/k,with its second folder path “/y/k”) by which the document is locatable.As noted above, this request may be a request for verification that thesecond. URL corresponds to a valid state of the document.

In operation 932, the management module 260 of the device 130 accessesthe browser cache 510 and checks the browser cache 510 for any data thatdefines the second state of the document (e.g., data that defines thesecond appearance of the document). Operation 932 may be performed inresponse to the verification provided by the web server machine 110 inoperation 832 (e.g., the verification that the second URL corresponds toa valid state for the document). As noted above, if such data is presentin the browser cache 510, it may be used (e.g., retrieved) by themanagement module 260, by the browser 250, or both, to display thedocument in its second state (e.g., with its second appearance) on thescreen 131 of the device 130.

In operation 934, the browser 250 on the device 130 displays thedocument in its second state, with its second appearance, and maydisplay the second URL (e.g., http://t.d.com/y/k) which corresponds thesecond state, while displaying the document in its second state.According to various example embodiments, the second URL is devoid ofany hash fragments (e.g., hash tags), and the second URL is displayed bythe browser 250 without any hash fragment included in the second URL.The management module 260 of the device 130 may fully or partiallycontrol the browser 250 during performance of operation 934.

In operation 940, the browser 250 on the device 130 executes a usercommand (e.g., submitted by the user 132) to redisplay the document inits first state. For example, the browser 250 may be displaying thedocument in its second state (e.g., as described above with respect tooperation 934), and the browser 250 may receive and execute a usercommand to navigate within a history of URLs that correspond to contentpreviously displayed by the browser 250 (e.g., a “back” command).Accordingly, the management module 260 may send the request received bythe web server machine 110 in operation 840. As noted above, thisrequest may he a request for verification that the first URL correspondsto a valid state of the document.

In operation 944, the browser 250 on the device 130 displays (e.g.,redisplays) the document in its first state, with its first appearance,and may display (e.g., redisplay) the first URL (e.g.,http://t.d.com/x/z) which corresponds the first state, while displayingthe document in its first state. As noted above, the first URL may bedevoid of any hash fragments (e.g., hash tags), and the first URL may bedisplayed by the browser 250 without any hash fragment included in thefirst URL. The management module 260 of the device 130 may fully orpartially control the browser 250 during performance of operation 944.

According to various example embodiments, one or more of themethodologies described herein may facilitate mapping page states toURLs. Moreover, one or more of the methodologies described herein mayfacilitate use of page states that are mapped to URLs, includingverification of URLs, caching of data that defines page states, anddisplay of various page states corresponding to mapped URLs. Hence, oneor more the methodologies described herein may facilitate retrieval andpresentation of a document having multiple states or multipleappearances without using hash fragments in URLs, as well as convenientand consistent use and sharing of humanly readable and intuitive URLsthat correspond to the various states of the document.

When these effects are considered in aggregate, one or more of themethodologies described herein may obviate a need for certain efforts orresources that otherwise would be involved in retrieval and presentationof a document having multiple states or multiple appearances. Effortsexpended by a user in revisiting a particular state or appearance of thedocument may be reduced by one or more of the methodologies describedherein. Computing resources used by one or more machines, databases, ordevices (e.g., within the network environment 100) may similarly bereduced. Examples of such computing resources include processor cycles,network traffic, memory usage, data storage capacity, power consumption,and cooling capacity.

FIG. 10 is a block diagram illustrating components of a machine 1000,according to some example embodiments, able to read instructions from amachine-readable medium (e.g., a machine-readable storage medium, acomputer-readable storage medium, or any suitable combination thereof)and perform any one or more of the methodologies discussed herein, inwhole or in part. Specifically, FIG. 10 shows a diagrammaticrepresentation of the machine 1000 in the example form of a computersystem and within which instructions 1024 (e.g., software, a program, anapplication, an applet, an app, or other executable code) for causingthe machine 1000 to perform any one or more of the methodologiesdiscussed herein may be executed, in whole or in part. In alternativeembodiments, the machine 1000 operates as a standalone device or may beconnected (e.g., networked) to other machines. In a networkeddeployment, the machine 1000 may operate in the capacity of a servermachine or a client machine in a server-client network environment, oras a peer machine in a distributed (e.g., peer-to-peer) networkenvironment. The machine 1000 may be a server computer, a clientcomputer, a personal computer (PC), a tablet computer, a laptopcomputer, a netbook, a set-top box (STB), a personal digital assistant(PDA), a cellular telephone, a smartphone, a web appliance, a networkrouter, a network switch, a network bridge, or any machine capable ofexecuting the instructions 1024, sequentially or otherwise, that specifyactions to be taken by that machine. Further, while only a singlemachine is illustrated, the term “machine” shall also be taken toinclude a collection of machines that individually or jointly executethe instructions 1024 to perform all or part of any one or more of themethodologies discussed herein.

The machine 1000 includes a processor 1002 (e.g., a central processingunit (CPU), a graphics processing unit (GPU), a digital signal processor(DSP), an application specific integrated circuit (ASIC), aradio-frequency integrated circuit (RFIC), or any suitable combinationthereof), a main memory 1004, and a static memory 1006, which areconfigured to communicate with each other via a bus 1008. The machine1000 may further include a graphics display 1010 (e.g., a plasma displaypanel (PDP), a light emitting diode (LED) display, a liquid crystaldisplay (LCD), a projector, or a cathode ray tube (CRT)). The machine1000 may also include an alphanumeric input device 1012 (e.g., akeyboard), a cursor control device 1014 (e.g., a mouse, a touchpad, atrackball, a joystick, a motion sensor, or other pointing instrument), astorage unit 1016, a signal generation device 1018 (e.g., a speaker),and a network interface device 1020.

The storage unit 1016 includes a machine-readable medium 1022 on whichis stored the instructions 1024 embodying any one or more of themethodologies or functions described herein. The instructions 1024 mayalso reside, completely or at least partially, within the main memory1004, within the processor 1002 (e.g., within the processor's cachememory), or both, during execution thereof by the machine 1000.Accordingly, the main memory 1004 and the processor 1002 may beconsidered as machine-readable media. The instructions 1024 may betransmitted or received over a network 1026 (e.g., network 190) via thenetwork interface device 1020.

As used herein, the term “memory” refers to a machine-readable mediumable to store data temporarily or permanently and may be taken toinclude, but not be limited to, random-access memory (RAM), read-onlymemory (ROM), buffer memory, flash memory, and cache memory. While themachine-readable medium 1022 is shown in an example embodiment to be asingle medium, the term “machine-readable medium” should be taken toinclude a single medium or multiple media (e.g., a centralized ordistributed database, or associated caches and servers) able to storeinstructions. The term “machine-readable medium” shall also be taken toinclude any medium, or combination of multiple media, that is capable ofstoring instructions for execution by a machine (e.g., machine 1000),such that the instructions, when executed by one or more processors ofthe machine (e.g., processor 1002), cause the machine to perform any oneor more of the methodologies described herein. Accordingly, a“machine-readable medium” refers to a single storage apparatus ordevice, as well as “cloud-based” storage systems or storage networksthat include multiple storage apparatus or devices. The term“machine-readable medium” shall accordingly be taken to include, but notbe limited to, one or more data repositories in the form of asolid-state memory, an optical medium, a magnetic medium, or anysuitable combination thereof.

Throughout this specification, plural instances may implementcomponents, operations, or structures described as a single instance.Although individual operations of one or more methods are illustratedand described as separate operations, one or more of the individualoperations may be performed concurrently, and nothing requires that theoperations be performed in the order illustrated. Structures andfunctionality presented as separate components in example configurationsmay be implemented as a combined structure or component. Similarly,structures and functionality presented as a single component may beimplemented as separate components. These and other variations,modifications, additions, and improvements fall within the scope of thesubject matter herein.

Certain embodiments are described herein as including logic or a numberof components, modules, or mechanisms. Modules may constitute eithersoftware modules (e.g., code embodied on a machine-readable medium or ina transmission signal) or hardware modules. A “hardware module” is atangible unit capable of performing certain operations and may beconfigured or arranged in a certain physical manner. In various exampleembodiments, one or more computer systems (e.g., a standalone computersystem, a client computer system, or a server computer system) or one ormore hardware modules of a computer system (e.g., a processor or a groupof processors) may be configured by software (e.g., an application orapplication portion) as a hardware module that operates to performcertain operations as described herein.

In some embodiments, a hardware module may be implemented mechanically,electronically, or any suitable combination thereof. For example, ahardware module may include dedicated circuitry or logic that ispermanently configured to perform certain operations. For example, ahardware module may be a special-purpose processor, such as a fieldprogrammable gate array (FPGA) or an ASIC. A hardware module may alsoinclude programmable logic or circuitry that is temporarily configuredby software to perform certain operations. For example, a hardwaremodule may include software encompassed within a general-purposeprocessor or other programmable processor. It will be appreciated thatthe decision to implement a hardware module mechanically, in dedicatedand permanently configured circuitry, or in temporarily configuredcircuitry (e.g., configured by software) may be driven by cost and timeconsiderations.

Accordingly, the phrase “hardware module” should be understood toencompass a tangible entity, be that an entity that is physicallyconstructed, permanently configured (e.g., hardwired), or temporarilyconfigured (e.g., programmed) to operate in a certain manner or toperform certain operations described herein. As used herein,“hardware-implemented module” refers to a hardware module. Consideringembodiments in which hardware modules are temporarily configured (e.g.,programmed), each of the hardware modules need not be configured orinstantiated at any one instance in time. For example, where a hardwaremodule comprises a general-purpose processor configured by software tobecome a special-purpose processor, the general-purpose processor may beconfigured as respectively different special-purpose processors (e.g.,comprising different hardware modules) at different times. Software mayaccordingly configure a processor, for example, to constitute aparticular hardware module at one instance of time and to constitute adifferent hardware module at a different instance of time.

Hardware modules can provide information to, and receive informationfrom, other hardware modules. Accordingly, the described hardwaremodules may be regarded as being communicatively coupled. Where multiplehardware modules exist contemporaneously, communications may be achievedthrough signal transmission (e.g., over appropriate circuits and buses)between or among two or more of the hardware modules. In embodiments inwhich multiple hardware modules are configured or instantiated atdifferent times, communications between such hardware modules may beachieved, for example, through the storage and retrieval of informationin memory structures to which the multiple hardware modules have access.For example, one hardware module may perform an operation and store theoutput of that operation in a memory device to which it iscommunicatively coupled. A further hardware module may then, at a latertime, access the memory device to retrieve and process the storedoutput. Hardware modules may also initiate communications with input oroutput devices, and can operate on a resource (e.g., a collection ofinformation).

The various operations of example methods described herein may beperformed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implemented modulesthat operate to perform one or more operations or functions describedherein. As used herein, “processor-implemented module” refers to ahardware module implemented using one or more processors.

Similarly, the methods described herein may be at least partiallyprocessor-implemented, a processor being an example of hardware. Forexample, at least some of the operations of a method may be performed byone or more processors or processor-implemented modules. Moreover, theone or more processors may also operate to support performance of therelevant operations in a “cloud computing” environment or as a “softwareas a service” (SaaS). For example, at least some of the operations maybe performed by a group of computers (as examples of machines includingprocessors), with these operations being accessible via a network (e.g.,the Internet) and via one or more appropriate interfaces (e.g., anapplication program interface (API)).

The performance of certain of the operations may be distributed amongthe one or more processors, not only residing within a single machine,but deployed across a number of machines. In some example embodiments,the one or more processors or processor-implemented modules may belocated in a single geographic location (e.g., within a homeenvironment, an office environment, or a server farm). In other exampleembodiments, the one or more processors or processor-implemented modulesmay be distributed across a number of geographic locations.

Some portions of the subject matter discussed herein may be presented interms of algorithms or symbolic representations of operations on datastored as bits or binary digital signals within a machine memory (e.g.,a computer memory). Such algorithms or symbolic representations areexamples of techniques used by those of ordinary skill in the dataprocessing arts to convey the substance of their work to others skilledin the art. As used herein, an “algorithm” is a self-consistent sequenceof operations or similar processing leading to a desired result. In thiscontext, algorithms and operations involve physical manipulation ofphysical quantities. Typically, but not necessarily, such quantities maytake the form of electrical, magnetic, or optical signals capable ofbeing stored, accessed, transferred, combined, compared, or otherwisemanipulated by a machine. It is convenient at times, principally forreasons of common usage, to refer to such signals using words such as“data,” “content,” “bits,” “values,” “elements,” “symbols,”“characters,” “terms,” “numbers,” “numerals,” or the like. These words,however, are merely convenient labels and are to be associated withappropriate physical quantities.

Unless specifically stated otherwise, discussions herein using wordssuch as “processing,” “computing,” “calculating,” “determining,”“presenting,” “displaying,” or the like may refer to actions orprocesses of a machine (e.g., a computer) that manipulates or transformsdata represented as physical (e.g., electronic, magnetic, or optical)quantities within one or more memories (e.g., volatile memory,non-volatile memory, or any suitable combination thereof), registers, orother machine components that receive, store, transmit, or displayinformation. Furthermore, unless specifically stated otherwise, theterms “a” or “an” are herein used, as is common in patent documents, toinclude one or more than one instance. Finally, as used herein, theconjunction “or” refers to a non-exclusive “or,” unless specificallystated otherwise.

We claim:
 1. A device for managing a state of a document, comprising:hardware processing circuitry; a hardware memory storing instructionsthat when executed cause the hardware processing circuitry to performoperations comprising: requesting from a server over a computer network,a document identified by a first uniform resource locator (URL);receiving, from the server, data defining the document, the dataincluding executable program code and non-executable data, the documentdefining an initial display state for the document; displaying thedocument in the initial display state; receiving input selecting asecond URL, the second URL defining a transition from the initialdisplay state to a second display state; executing the program code todetect the transition; obtaining data for the second display state fromthe executing program code; and displaying the document in the seconddisplay state based on the obtained data, wherein displaying thedocument in the second display state comprises displaying the secondURL.
 2. The device of claim 1, the operations further comprising:receiving a user command to navigate to the first URL; and displayingthe document in the initial display state in response to receiving theuser command without re-requesting the document from the server.
 3. Thedevice of claim 2, wherein the user command specifies the first URLwithout any hash fragments.
 4. The device of claim 2, wherein the usercommand is received via a “back” button of a browser.
 5. The device ofclaim 2, wherein the user command is received via a “forward” button ofa browser.
 6. The device of claim 2, the operations further comprisingstoring an association between the first URL and data defining theinitial display state, wherein the displaying of the document in theinitial display state in response to receiving the user command is basedon the stored association.
 7. The device of claim 6, the operationsfurther comprising storing a second association between the second URLand second data defining the second display state.
 8. The device ofclaim 7, wherein obtaining data for the second display state comprisesreading the stored second association between the second URL and thesecond data defining the second display state, wherein the second datais the data for the second display state.
 9. The device of claim 8,wherein the obtaining of data for the second display state furthercomprises verifying that the second URL corresponds to a valid state ofthe document, and wherein the displaying of the document in the seconddisplay state is in response to the verification being successful.
 10. Amethod of managing a state of a document, comprising: requesting from aserver over a computer network, a document identified by a first uniformresource locator (URL); receiving, from the server, data defining thedocument, the data including executable program code and non-executabledata, the document defining an initial display state for the document;displaying the document in the initial display state; receiving inputselecting a second URI, the second URL defining a transition from theinitial display state to a second display state; executing the programcode to detect the transition; obtaining data for the second displaystate from the executing program code; and displaying the document inthe second display state based on the obtained data, wherein displayingthe document in the second display state comprises displaying the secondURL.
 11. The method of claim 10, further comprising: receiving a usercommand to navigate to the first URL; and displaying the document in theinitial display state in response to receiving the user command withoutre-requesting the document from the server.
 12. The method of claim 11,wherein the user command specifies the first URL without any hashfragments.
 13. The method of claim 11, wherein the user command isreceived via a “back” button of a browser.
 14. The method of claim 11,wherein the user command is received via a “forward” button of abrowser.
 15. The method of claim 11, further comprising storing anassociation between the first URL and data defining the initial displaystate, wherein the displaying of the document in the initial displaystate in response to receiving the user command is based on the storedassociation.
 16. The method of claim 15, further comprising storing asecond association between the second URL and second data defining thesecond display state.
 17. The method of claim 16, wherein obtaining datafur the second display state comprises reading the stored secondassociation between the second URL and the second data defining thesecond display state, wherein the second data is the data for the seconddisplay state.
 18. The method of claim 17, wherein the obtaining of datafor the second display state further comprises verifying that the secondURL corresponds to a valid state of the document, and wherein thedisplaying of the document in the second display state is in response tothe verification being successful.
 19. A non-transitory computerreadable storage medium comprising instructions that when executed causehardware processing circuitry to perform operations for managing a stateof a document, the operations comprising: requesting from a server overa computer network, a document identified by a first uniform resourcelocator (URL); receiving, from the server, data defining the document,the data including executable program code and non-executable data, thedocument defining an initial display state for the document; displayingthe document in the initial display state; receiving input selecting asecond URL, the second URL defining a transition from the initialdisplay state to a second display state; executing the program code todetect the transition; obtaining data for the second display state fromthe executing program code; and displaying the document in the seconddisplay state based on the obtained data, wherein displaying thedocument in the second display state comprises displaying the secondURL.
 20. The non-transitory computer readable storage medium of claim19, further comprising storing an association between the first URL anddata defining the initial display state, wherein the displaying of thedocument in the initial display state in response to receiving the usercommand is based on the stored association.